/* Copyright Thanh-Trung Pham, 2015 */

package jp.ac.uaizu.message;

import java.util.ListResourceBundle;

/**
 * @author Thanh-Trung Pham
 */
public class SerCompMessageResource extends ListResourceBundle {

    //////////////////////////////////////////////////////
    //Messages from 1 to 99 are for the SerCompTranslators component.
    public static final String TRANSLATORS_UNEXPECTED_EXCEPTION = "1";
    public static final String TRANSLATORS_MISSING_INTERFACE = "2";
    public static final String TRANSLATORS_NOT_FOUND = "3";
    public static final String TRANSLATORS_FOLDER_NOT_EXISTING = "4";
    public static final String TRANSLATORS_NOT_REGISTERED = "5";
    public static final String TRANSLATORS_NOT_CLASS = "6";
    public static final String TRANSLATORS_FOLDER_EXPECTED = "7";

    //Messages from 100 to 199 are for SerCompMediator component
    public static final String MEDIATOR_UNSUPPORTED_PREDICTION_METHOD_IN_SYNC_MODE = "100";
    public static final String MEDIATOR_INVALID_TRANSLATED_INPUT_MODEL = "101";
    public static final String MEDIATOR_INVALID_PREDICTION_RESULTS = "102";
    public static final String MEDIATOR_ALREADY_PUBLISHED = "103";
    public static final String MEDIATOR_UNEXPECTED_EXCEPTION = "104";
    public static final String MEDIATOR_NO_RUNNING_PREDICTION_WORKER = "105";

    //Messages from 200 to 299 are for SerCompGenerators component
    public static final String GENERATORS_UNEXPECTED_EXCEPTION = "201";
    public static final String GENERATORS_MISSING_INTERFACE = "202";
    public static final String GENERATORS_NOT_FOUND = "203";
    public static final String GENERATORS_FOLDER_NOT_EXISTING = "204";
    public static final String GENERATORS_NOT_REGISTERED = "205";
    public static final String GENERATORS_NOT_CLASS = "206";
    public static final String GENERATORS_FOLDER_EXPECTED = "207";

    private static final Object[][] CONTENTS = {
            ////////////////////////////////////////////////////////////////////////////////////
            //for the SerCompTranslators component.
            {TRANSLATORS_UNEXPECTED_EXCEPTION, "Unexpected exception: {0}."},
            {TRANSLATORS_MISSING_INTERFACE, "Translator ''{0}'' is required to implement interface ''{1}''."},
            {TRANSLATORS_NOT_FOUND, "Translator ''{0}'' was not found in folder ''{1}''."},
            {TRANSLATORS_FOLDER_NOT_EXISTING, "Folder ''{0}'' for translators does not exist."},
            {TRANSLATORS_NOT_REGISTERED, "Translator ''{0}'' was not registered."},
            {TRANSLATORS_NOT_CLASS, "A translator cannot be an interface."},
            {TRANSLATORS_FOLDER_EXPECTED, "Folder ''{0}'' for translators is a file."},

            //for the SerCompMediator component.
            {MEDIATOR_UNSUPPORTED_PREDICTION_METHOD_IN_SYNC_MODE, "A simulation as the prediction method is not supported in the synchronous mode."},
            {MEDIATOR_INVALID_TRANSLATED_INPUT_MODEL, "The translated input model for RMPI is invalid: ''{0}''."},
            {MEDIATOR_INVALID_PREDICTION_RESULTS, "The prediction results are invalid."},
            {MEDIATOR_ALREADY_PUBLISHED, "The service has already been published."},
            {MEDIATOR_UNEXPECTED_EXCEPTION, "Unexpected exception: {0}."},
            {MEDIATOR_NO_RUNNING_PREDICTION_WORKER, "There is no running prediction worker."},

            //for the SerCompGenerators component.
            {GENERATORS_UNEXPECTED_EXCEPTION, "Unexpected exception: {0}."},
            {GENERATORS_MISSING_INTERFACE, "Generator ''{0}'' is required to implement interface ''{1}''."},
            {GENERATORS_NOT_FOUND, "Generator ''{0}'' was not found in folder ''{1}''."},
            {GENERATORS_FOLDER_NOT_EXISTING, "Folder ''{0}'' for generators does not exist."},
            {GENERATORS_NOT_REGISTERED, "Generator ''{0}'' was not registered."},
            {GENERATORS_NOT_CLASS, "A generator cannot be an interface."},
            {GENERATORS_FOLDER_EXPECTED, "Folder ''{0}'' for generator is a file."},
    };

    /*
     * (non-Javadoc)
     *
     * @see java.util.ListResourceBundle#getContents()
     */
    @Override
    protected Object[][] getContents() {
        return CONTENTS;
    }
}
